<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<title>TURN Server: StunAttr Class Reference</title>

<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css" />

<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>

</head>
<body>
<div id="top"><!-- do not remove this div! -->


<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  
  
  <td style="padding-left: 0.5em;">
   <div id="projectname">TURN Server
   &#160;<span id="projectnumber">1.5</span>
   </div>
   
  </td>
  
  
  
 </tr>
 </tbody>
</table>
</div>

<!-- Generated by Doxygen 1.8.0 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.html"><span>Class&#160;List</span></a></li>
      <li><a href="classes.html"><span>Class&#160;Index</span></a></li>
      <li><a href="hierarchy.html"><span>Class&#160;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Class&#160;Members</span></a></li>
    </ul>
  </div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Friends</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Defines</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

</div>
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pro-methods">Protected Member Functions</a> &#124;
<a href="#pro-static-methods">Static Protected Member Functions</a>  </div>
  <div class="headertitle">
<div class="title">StunAttr Class Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p><code>#include &lt;<a class="el" href="TurnMsgLib_8h_source.html">TurnMsgLib.h</a>&gt;</code></p>
<div class="dynheader">
Inheritance diagram for StunAttr:</div>
<div class="dyncontent">
 <div class="center">
  <img src="classStunAttr.png" usemap="#StunAttr_map" alt=""/>
  <map id="StunAttr_map" name="StunAttr_map">
<area href="classStunAttrAddr.html" alt="StunAttrAddr" shape="rect" coords="0,56,158,80"/>
<area href="classStunAttrChangeRequest.html" alt="StunAttrChangeRequest" shape="rect" coords="168,56,326,80"/>
<area href="classStunAttrChannelNumber.html" alt="StunAttrChannelNumber" shape="rect" coords="336,56,494,80"/>
<area href="classStunAttrEvenPort.html" alt="StunAttrEvenPort" shape="rect" coords="504,56,662,80"/>
<area href="classStunAttrPadding.html" alt="StunAttrPadding" shape="rect" coords="672,56,830,80"/>
<area href="classStunAttrReservationToken.html" alt="StunAttrReservationToken" shape="rect" coords="840,56,998,80"/>
<area href="classStunAttrResponsePort.html" alt="StunAttrResponsePort" shape="rect" coords="1008,56,1166,80"/>
</map>
 </div></div>

<p><a href="classStunAttr-members.html">List of all members.</a></p>
<table class="memberdecls">
<tr><td colspan="2"><h2><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:ad36b6880e055d053a0c476d3bfe5fdd7"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classStunAttr.html#ad36b6880e055d053a0c476d3bfe5fdd7">StunAttr</a> ()</td></tr>
<tr class="memitem:a50bcc1993664b13ab3993acfe1d6ee6b"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classStunAttr.html#a50bcc1993664b13ab3993acfe1d6ee6b">StunAttr</a> (const <a class="el" href="classStunAttrIterator.html">StunAttrIterator</a> &amp;iter)  throw (WrongStunAttrFormatException, EndOfStunMsgException)</td></tr>
<tr class="memitem:a80d3fb3812afddeddb654acdf5b527a3"><td class="memItemLeft" align="right" valign="top">virtual&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classStunAttr.html#a80d3fb3812afddeddb654acdf5b527a3">~StunAttr</a> ()</td></tr>
<tr class="memitem:a480837f92b9686f7bfca87f4867e9d63"><td class="memItemLeft" align="right" valign="top">const u08bits *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classStunAttr.html#a480837f92b9686f7bfca87f4867e9d63">getRawValue</a> (size_t &amp;sz) const </td></tr>
<tr class="memitem:ad64afa79a2de38041a5d11a781fd5696"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classStunAttr.html#ad64afa79a2de38041a5d11a781fd5696">setRawValue</a> (u08bits *value, size_t sz)  throw (WrongStunAttrFormatException)</td></tr>
<tr class="memitem:ac62cc08d8b842cd2dcbeff961376c52d"><td class="memItemLeft" align="right" valign="top">u16bits&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classStunAttr.html#ac62cc08d8b842cd2dcbeff961376c52d">getType</a> () const </td></tr>
<tr class="memitem:ab43ead21a801fa85baf2e15006bc3f06"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classStunAttr.html#ab43ead21a801fa85baf2e15006bc3f06">setType</a> (u16bits at)</td></tr>
<tr class="memitem:a9827b6398968e6623431ba587b8e22a4"><td class="memTemplParams" colspan="2">template&lt;class T &gt; </td></tr>
<tr class="memitem:a9827b6398968e6623431ba587b8e22a4"><td class="memTemplItemLeft" align="right" valign="top">int&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="classStunAttr.html#a9827b6398968e6623431ba587b8e22a4">addToMsg</a> (T &amp;msg)  throw (WrongStunAttrFormatException, WrongStunBufferFormatException)</td></tr>
<tr><td colspan="2"><h2><a name="pro-methods"></a>
Protected Member Functions</h2></td></tr>
<tr class="memitem:a53076f8b8877047f6854155edd42d794"><td class="memItemLeft" align="right" valign="top">virtual int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classStunAttr.html#a53076f8b8877047f6854155edd42d794">addToBuffer</a> (u08bits *buffer, size_t &amp;sz)  throw (WrongStunAttrFormatException, WrongStunBufferFormatException)</td></tr>
<tr><td colspan="2"><h2><a name="pro-static-methods"></a>
Static Protected Member Functions</h2></td></tr>
<tr class="memitem:a5d66a8ad2d753ef9279217eaf453d657"><td class="memItemLeft" align="right" valign="top">static <a class="el" href="ns__turn__msg_8h.html#ad78e84b431d789f6799b3dabf786e032">stun_attr_ref</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classStunAttr.html#a5d66a8ad2d753ef9279217eaf453d657">getSar</a> (const <a class="el" href="classStunAttrIterator.html">StunAttrIterator</a> &amp;iter)</td></tr>
</table>
<hr/><a name="details" id="details"></a><h2>Detailed Description</h2>
<div class="textblock"><p>Generic root class of all STUN attributes </p>

<p>Definition at line <a class="el" href="TurnMsgLib_8h_source.html#l00136">136</a> of file <a class="el" href="TurnMsgLib_8h_source.html">TurnMsgLib.h</a>.</p>
</div><hr/><h2>Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="ad36b6880e055d053a0c476d3bfe5fdd7"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classStunAttr.html#ad36b6880e055d053a0c476d3bfe5fdd7">StunAttr::StunAttr</a> </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td><code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Definition at line <a class="el" href="TurnMsgLib_8h_source.html#l00138">138</a> of file <a class="el" href="TurnMsgLib_8h_source.html">TurnMsgLib.h</a>.</p>
<div class="fragment"><pre class="fragment">: _attr_type(0), _value(0), _sz(0) {}
</pre></div>
</div>
</div>
<a class="anchor" id="a50bcc1993664b13ab3993acfe1d6ee6b"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classStunAttr.html#ad36b6880e055d053a0c476d3bfe5fdd7">StunAttr::StunAttr</a> </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classStunAttrIterator.html">StunAttrIterator</a> &amp;&#160;</td>
          <td class="paramname"><em>iter</em></td><td>)</td>
          <td>  throw (<a class="el" href="classWrongStunAttrFormatException.html">WrongStunAttrFormatException</a>, <a class="el" href="classEndOfStunMsgException.html">EndOfStunMsgException</a>)<code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Definition at line <a class="el" href="TurnMsgLib_8h_source.html#l00139">139</a> of file <a class="el" href="TurnMsgLib_8h_source.html">TurnMsgLib.h</a>.</p>
<div class="fragment"><pre class="fragment">                                                                                                          {
                <span class="keywordflow">if</span>(iter.<a class="code" href="classStunAttrIterator.html#a63ae0391b82db2cb43bf145c1d9b3cf1">eof</a>()) {
                        <span class="keywordflow">throw</span> <a class="code" href="classEndOfStunMsgException.html">EndOfStunMsgException</a>();
                }
                <span class="keywordtype">size_t</span> sz = 0;
                <span class="keyword">const</span> u08bits *ptr = iter.<a class="code" href="classStunAttrIterator.html#a998fc2765ce87f27fffe233dab8146aa">getRawBuffer</a>(sz);
                <span class="keywordflow">if</span>(sz&gt;=0xFFFF)
                        <span class="keywordflow">throw</span> <a class="code" href="classWrongStunAttrFormatException.html">WrongStunAttrFormatException</a>();
                <span class="keywordtype">int</span> at = iter.<a class="code" href="classStunAttrIterator.html#a76021c2aebd395e779b97ba78e617b96">getType</a>();
                <span class="keywordflow">if</span>(at&lt;0)
                        <span class="keywordflow">throw</span> <a class="code" href="classWrongStunAttrFormatException.html">WrongStunAttrFormatException</a>();
                _attr_type = (u16bits)at;
                _sz = sz;
                _value=(u08bits*)turn_malloc(_sz);
                ns_bcopy(ptr,_value,_sz);
        }
</pre></div>
</div>
</div>
<a class="anchor" id="a80d3fb3812afddeddb654acdf5b527a3"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual <a class="el" href="classStunAttr.html#a80d3fb3812afddeddb654acdf5b527a3">StunAttr::~StunAttr</a> </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td><code> [inline, virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Definition at line <a class="el" href="TurnMsgLib_8h_source.html#l00155">155</a> of file <a class="el" href="TurnMsgLib_8h_source.html">TurnMsgLib.h</a>.</p>
<div class="fragment"><pre class="fragment">                            {
                <span class="keywordflow">if</span>(_value)
                        turn_free(_value,_sz);
        }
</pre></div>
</div>
</div>
<hr/><h2>Member Function Documentation</h2>
<a class="anchor" id="a53076f8b8877047f6854155edd42d794"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual int <a class="el" href="classStunAttr.html#a53076f8b8877047f6854155edd42d794">StunAttr::addToBuffer</a> </td>
          <td>(</td>
          <td class="paramtype">u08bits *&#160;</td>
          <td class="paramname"><em>buffer</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t &amp;&#160;</td>
          <td class="paramname"><em>sz</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td>  throw (<a class="el" href="classWrongStunAttrFormatException.html">WrongStunAttrFormatException</a>, <a class="el" href="classWrongStunBufferFormatException.html">WrongStunBufferFormatException</a>)<code> [inline, protected, virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Reimplemented in <a class="el" href="classStunAttrPadding.html#aaf79bba29923207b6ae90e0e21a2fac4">StunAttrPadding</a>, <a class="el" href="classStunAttrResponsePort.html#a91a4207beda4b2481ae2714b12b8cbb3">StunAttrResponsePort</a>, <a class="el" href="classStunAttrChangeRequest.html#a8517603c6c88f7827b56775dffe37d89">StunAttrChangeRequest</a>, <a class="el" href="classStunAttrAddr.html#a1d813163fe8800559e9ccc1798dbbd85">StunAttrAddr</a>, <a class="el" href="classStunAttrReservationToken.html#a7d37332dfffd963e9546ae48fa174abd">StunAttrReservationToken</a>, <a class="el" href="classStunAttrEvenPort.html#af575383927b15534a64fce6189afb87a">StunAttrEvenPort</a>, and <a class="el" href="classStunAttrChannelNumber.html#a831724f766e4e3eff7b27aaf9564bff3">StunAttrChannelNumber</a>.</p>

<p>Definition at line <a class="el" href="TurnMsgLib_8h_source.html#l00197">197</a> of file <a class="el" href="TurnMsgLib_8h_source.html">TurnMsgLib.h</a>.</p>
<div class="fragment"><pre class="fragment">                                                                                                                                 {
                <span class="keywordflow">if</span>(buffer) {
                        <span class="keywordflow">if</span>(!_value)
                                <span class="keywordflow">throw</span> <a class="code" href="classWrongStunAttrFormatException.html">WrongStunAttrFormatException</a>();
                        <span class="keywordflow">if</span>(<a class="code" href="ns__turn__msg_8h.html#a66ee2e33b2311217a586165c02a6507b">stun_attr_add_str</a>(buffer, &amp;sz, _attr_type, _value, _sz)&lt;0) {
                                <span class="keywordflow">throw</span> <a class="code" href="classWrongStunBufferFormatException.html">WrongStunBufferFormatException</a>();
                        }
                        <span class="keywordflow">return</span> 0;
                }
                <span class="keywordflow">throw</span> <a class="code" href="classWrongStunBufferFormatException.html">WrongStunBufferFormatException</a>();
        }
</pre></div>
</div>
</div>
<a class="anchor" id="a9827b6398968e6623431ba587b8e22a4"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class T &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">int <a class="el" href="classStunAttr.html#a9827b6398968e6623431ba587b8e22a4">StunAttr::addToMsg</a> </td>
          <td>(</td>
          <td class="paramtype">T &amp;&#160;</td>
          <td class="paramname"><em>msg</em></td><td>)</td>
          <td>  throw (<a class="el" href="classWrongStunAttrFormatException.html">WrongStunAttrFormatException</a>, <a class="el" href="classWrongStunBufferFormatException.html">WrongStunBufferFormatException</a>)<code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Definition at line <a class="el" href="TurnMsgLib_8h_source.html#l00182">182</a> of file <a class="el" href="TurnMsgLib_8h_source.html">TurnMsgLib.h</a>.</p>
<div class="fragment"><pre class="fragment">                                                                                                 {
                <span class="keywordflow">if</span>(!_attr_type)
                        <span class="keywordflow">throw</span> <a class="code" href="classWrongStunAttrFormatException.html">WrongStunAttrFormatException</a>();
                u08bits *buffer = msg.getRawBuffer();
                <span class="keywordflow">if</span>(buffer) {
                        <span class="keywordtype">size_t</span> sz = msg.getSize();
                        <span class="keywordflow">if</span>(<a class="code" href="classStunAttr.html#a53076f8b8877047f6854155edd42d794">addToBuffer</a>(buffer, sz)&lt;0) {
                                <span class="keywordflow">throw</span> <a class="code" href="classWrongStunBufferFormatException.html">WrongStunBufferFormatException</a>();
                        }
                        msg.setSize(sz);
                        <span class="keywordflow">return</span> 0;
                }
                <span class="keywordflow">throw</span> <a class="code" href="classWrongStunBufferFormatException.html">WrongStunBufferFormatException</a>();
        }
</pre></div>
</div>
</div>
<a class="anchor" id="a480837f92b9686f7bfca87f4867e9d63"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const u08bits* <a class="el" href="classStunAttr.html#a480837f92b9686f7bfca87f4867e9d63">StunAttr::getRawValue</a> </td>
          <td>(</td>
          <td class="paramtype">size_t &amp;&#160;</td>
          <td class="paramname"><em>sz</em></td><td>)</td>
          <td> const<code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Definition at line <a class="el" href="TurnMsgLib_8h_source.html#l00159">159</a> of file <a class="el" href="TurnMsgLib_8h_source.html">TurnMsgLib.h</a>.</p>
<div class="fragment"><pre class="fragment">                                                     {
                sz=_sz;
                <span class="keywordflow">return</span> _value;
        }
</pre></div>
</div>
</div>
<a class="anchor" id="a5d66a8ad2d753ef9279217eaf453d657"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static <a class="el" href="ns__turn__msg_8h.html#ad78e84b431d789f6799b3dabf786e032">stun_attr_ref</a> <a class="el" href="classStunAttr.html#a5d66a8ad2d753ef9279217eaf453d657">StunAttr::getSar</a> </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classStunAttrIterator.html">StunAttrIterator</a> &amp;&#160;</td>
          <td class="paramname"><em>iter</em></td><td>)</td>
          <td><code> [inline, static, protected]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Definition at line <a class="el" href="TurnMsgLib_8h_source.html#l00208">208</a> of file <a class="el" href="TurnMsgLib_8h_source.html">TurnMsgLib.h</a>.</p>
<div class="fragment"><pre class="fragment">                                                                  {
                <span class="keywordflow">return</span> iter._sar;
        }
</pre></div>
</div>
</div>
<a class="anchor" id="ac62cc08d8b842cd2dcbeff961376c52d"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">u16bits <a class="el" href="classStunAttr.html#ac62cc08d8b842cd2dcbeff961376c52d">StunAttr::getType</a> </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const<code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Definition at line <a class="el" href="TurnMsgLib_8h_source.html#l00173">173</a> of file <a class="el" href="TurnMsgLib_8h_source.html">TurnMsgLib.h</a>.</p>
<div class="fragment"><pre class="fragment">                                {
                <span class="keywordflow">return</span> _attr_type;
        }
</pre></div>
</div>
</div>
<a class="anchor" id="ad64afa79a2de38041a5d11a781fd5696"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="classStunAttr.html#ad64afa79a2de38041a5d11a781fd5696">StunAttr::setRawValue</a> </td>
          <td>(</td>
          <td class="paramtype">u08bits *&#160;</td>
          <td class="paramname"><em>value</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>sz</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td>  throw (<a class="el" href="classWrongStunAttrFormatException.html">WrongStunAttrFormatException</a>)<code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Definition at line <a class="el" href="TurnMsgLib_8h_source.html#l00163">163</a> of file <a class="el" href="TurnMsgLib_8h_source.html">TurnMsgLib.h</a>.</p>
<div class="fragment"><pre class="fragment">                                                                                        {
                <span class="keywordflow">if</span>(sz&gt;0xFFFF)
                        <span class="keywordflow">throw</span> <a class="code" href="classWrongStunAttrFormatException.html">WrongStunAttrFormatException</a>();
                <span class="keywordflow">if</span>(_value)
                        turn_free(_value,_sz);
                _sz = sz;
                _value=(u08bits*)turn_malloc(_sz);
                ns_bcopy(value,_value,_sz);
        }
</pre></div>
</div>
</div>
<a class="anchor" id="ab43ead21a801fa85baf2e15006bc3f06"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="classStunAttr.html#ab43ead21a801fa85baf2e15006bc3f06">StunAttr::setType</a> </td>
          <td>(</td>
          <td class="paramtype">u16bits&#160;</td>
          <td class="paramname"><em>at</em></td><td>)</td>
          <td><code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Definition at line <a class="el" href="TurnMsgLib_8h_source.html#l00177">177</a> of file <a class="el" href="TurnMsgLib_8h_source.html">TurnMsgLib.h</a>.</p>
<div class="fragment"><pre class="fragment">                                 {
                _attr_type = at;
        }
</pre></div>
</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li>src/client++/<a class="el" href="TurnMsgLib_8h_source.html">TurnMsgLib.h</a></li>
</ul>
</div><!-- contents -->


<hr class="footer"/><address class="footer"><small>
Generated on Mon Jan 21 2013 13:10:13 for TURN Server by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.0
</small></address>

</body>
</html>
